@extends('layouts.main')

@inject('special_offer','App\Http\Presenters\ChoicePresenter')

@section('title', '显示物料')

@section('content')
<h3>@yield('title')</h3>
<div class="btn-group" role="group">
  <a href="{{ action('BusinessData\MaterialController@index') }}" class="btn btn-primary">返回列表</a>
</div>

<form class="form-horizontal">
  <div class="form-group">
		<label for="year" class="col-sm-2 control-label">年度</label>
		<div class="col-sm-6">
			<select class="form-control" id="year" name="year" disabled>
				<option value="{{ $model->year }}">{{ $model->year }}</option>
			</select>
		</div>
    </div>

    <div class="form-group">
		<label for="material" class="col-sm-2 control-label">物料编码</label>
		<div class="col-sm-3">
			<input class="form-control" id="material" name="material" value="{{ $model->material }}" disabled>
		</div>
    </div>

	<div class="form-group">
		<label for="material_desc" class="col-sm-2 control-label">物料描述</label>
		<div class="col-sm-3">
		  <input class="form-control" id="material_desc" name="material_desc" value="{{ $model->material_desc }}" disabled>
		</div>
	</div>

    <div class="form-group">
		<label for="category_small_id" class="col-sm-2 control-label">统计用细分类</label>
		<div class="col-sm-6">
			<select class="form-control" id="category_small_id" name="category_small_id" disabled>
			<option value="{{ $model->category_small_id }}">{{ $model->category_small ? $model->category_small->name : '' }}</option>
			</select>
		</div>
    </div>

	<div class="form-group">
		<label for="category_big_id" class="col-sm-2 control-label">大分类</label>
		<div class="col-sm-6">
			<select class="form-control" id="category_big_id" name="category_big_id" disabled>
			<option value="{{ $model->category_big_id }}">{{ $model->category_big ? $model->category_big->name : '' }}</option>
			</select>
		</div>
    </div>

	<div class="form-group">
		<label for="category_contract_id" class="col-sm-2 control-label">合同大类</label>
		<div class="col-sm-6">
			<select class="form-control" id="category_contract_id" name="category_contract_id" disabled>
			<option value="{{ $model->category_contract_id }}">{{ $model->category_contract ? $model->category_contract->name : '' }}</option>
			</select>
		</div>
    </div>

	<div class="form-group">
		<label for="category_key_product_id" class="col-sm-2 control-label">重点产品分类</label>
		<div class="col-sm-6">
			<select class="form-control" id="category_key_product_id" name="category_key_product_id" disabled>
			<option value="{{ $model->category_key_product_id }}">{{ $model->category_key_product ? $model->category_key_product->name : ''}}</option>
			</select>
		</div>
    </div>

	<div class="form-group">
		<label for="is_special_offer" class="col-sm-2 control-label">是否特价</label>
		<div class="col-sm-6">
			<select class="form-control" id="is_special_offer" name="is_special_offer" disabled>
				<option value="{{ $model->is_special_offer }}">{{ $special_offer->judgeWhether($model->is_special_offer) }}</option>
			</select>
		</div>
    </div>

    <div class="form-group">
		<div class="col-sm-offset-2 col-sm-10">
			<a href="{{ action('BusinessData\MaterialController@edit', $model) }}" class="btn btn-primary">编辑</a>
		</div>
    </div>
</form>

@endsection